#pragma once

#include <winsock2.h>
#include <ws2tcpip.h>

#include <string>
using namespace std;

#include "Protocol.h"

namespace libdmail
{
	class TcpClient
	{
	private:
		SOCKET mConnectSocket;
		string mServer;
		string mPort;

		Protocol *mProtocol;

	public:
		TcpClient(void);
		TcpClient(Protocol *protocol);
	public:
		~TcpClient(void);

	public:
		int connectServer(string server, string port="110");

		int disconnectServer();

		int receiveData();

		int sendData(string data);

	};
}